package com.tianqu.tms.www.cardect.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.tianqu.tms.core.base.Logger;
import com.tianqu.tms.core.base.TmsAction;
import com.tianqu.tms.core.base.UserContext;
import com.tianqu.tms.core.util.TmsConstants;
import com.tianqu.tms.www.cardect.controller.CarWDPersonBaseInfoDetailController;
import com.tianqu.tms.www.cardect.viewhelper.CarWDPersonTopListViewHelper;
/**
 * 待检测（人工）跳转到车辆基本信息详细页Action
 * 
 * @author tianshifu
 *
 */
public class CarWDPersonBaseInfoDetailAction extends TmsAction {
	private Logger logger = Logger.getLogger(CarWDPersonBaseInfoDetailAction.class);//log
	private static final String DETECT_INPUT_DATA = "detect_input_data";//检测录入信息
	private static final String IMGLIST = "imgList";//用于存放图片对象的list
	
	@Override
	protected ActionForward doAction(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response,
			UserContext uc) throws Exception {
		logger.debug(this.getClass().getName() + "#execute was called.");
		
		//每次进来都清空uc
		uc.removeAttribute(DETECT_INPUT_DATA);//检测
		uc.removeAttribute(IMGLIST);//图片		
		
		CarWDPersonBaseInfoDetailController controller = new CarWDPersonBaseInfoDetailController();
		controller.execute(uc);
		
		
		request.setAttribute(TmsConstants.VIEWHELP, (CarWDPersonTopListViewHelper)uc.getAttribute(TmsConstants.VIEWHELP));//将车辆基本信息打到前台
		logger.debug(this.getClass().getName() + "#doAction was completed.");
		return mapping.findForward(TmsConstants.SUCCESS); 
	}

}
